﻿import request from '/@/utils/request';
enum Api {
  AddDevice = '/api/device/add',
  DeleteDevice = '/api/device/delete',
  UpdateDevice = '/api/device/update',
  PageDevice = '/api/device/page',
  DetailDevice = '/api/device/detail',
  GetProjectProjectIdDropdown = '/api/device/ProjectProjectIdDropdown',
}

// 增加人脸设备
export const addDevice = (params?: any) =>
	request({
		url: Api.AddDevice,
		method: 'post',
		data: params,
	});

// 删除人脸设备
export const deleteDevice = (params?: any) => 
	request({
			url: Api.DeleteDevice,
			method: 'post',
			data: params,
		});

// 编辑人脸设备
export const updateDevice = (params?: any) => 
	request({
			url: Api.UpdateDevice,
			method: 'post',
			data: params,
		});

// 分页查询人脸设备
export const pageDevice = (params?: any) => 
	request({
			url: Api.PageDevice,
			method: 'post',
			data: params,
		});

// 详情人脸设备
export const detailDevice = (id: any) => 
	request({
			url: Api.DetailDevice,
			method: 'get',
			data: { id },
		});

export const getProjectProjectIdDropdown = () =>
		request({
		url: Api.GetProjectProjectIdDropdown,
		method: 'get'
		});

